package com.example.brazil_project.function;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import com.example.brazil_project.AddProductActivity;
import com.example.brazil_project.DucumentActivity;
import com.example.brazil_project.DucumentDetailActivity;
import com.example.brazil_project.RedactDocumentDetailActivity;
import com.example.brazil_project.SearchProductActivity;
import com.example.brazil_project.parameter.Parameter;
import com.example.brazil_project.util.HttpUtil;
import com.example.brazil_project.util.IOUtil;
import com.example.brazil_project.util.ImageCutUtil;
import com.example.brazil_project.util.JSFunction;
import com.example.brazil_project.util.ParameterUtil;
import com.example.brazil_project.util.StringUtils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.webkit.WebView;

public class PhotographArrFunction {
	Activity mContxt;  
	WebView webview;
	 public PhotographArrFunction(Activity mContxt,Object webview) {  
	        this.mContxt = mContxt;  
	        this.webview = (WebView) webview;
	  }  
	
	 //提交到货单
	 public void addPhotographArr(String img_name){
		 Map map = new HashMap();
		 if(!StringUtils.isBlank(img_name)){
				String FiletoString =IOUtil.FiletoString(img_name,true);
				map.put("stream", FiletoString);
				map.put("img", img_name);
				Public_method  p = new Public_method(mContxt);
				map.put("username", p.getLoginUserName());
			 }
		 
			String url = Parameter.getServerPath()+"APP/msg/addPhotographArr.nut";
			String  msg = HttpUtil.doPost(url,map);
			 webview.loadUrl(JSFunction.getAlertMSGFunction(msg)); 		 
		 
		 
	 }
	 
}
